package com.atguigu.day211105.exer;

public class Circle extends Graphic {
    private double radius;

    public double getRedius() {
        return radius;
    }

    public void setRedius(double redius) {
        this.radius = redius;
    }

    public Circle(String name, double redius) {
        super(name);
        this.radius = redius;
    }

    @Override
    public double getArea() {
        return radius*radius*Math.PI;
    }

    @Override
    public double getPerimeter() {
        return 2*Math.PI*radius;
    }

    @Override
    public String getInfo() {
        return "名称:"+getName()+"面积:"+getArea()+"周长"+getPerimeter()+"半径"+radius;
    }
}
